﻿using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using Cinema.Control;

namespace Server
{
    class Server
    {
        static void Main(string[] args)
        {
           // RemotingConfiguration.Configure("Server.exe.config");
            Console.WriteLine("### Server started ###");
            Console.WriteLine("Push the enter to end");
        
            // registering a new http channel.
            HttpChannel c = new HttpChannel(159753);
           // ChannelDataStore.RegisterChannel(c);
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(Cinema.Control.MainClass), "MainClass.soap", WellKnownObjectMode.Singleton);

            // registering a WKO type.
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(Cinema.Control.MainClass), "MainClass.soap", WellKnownObjectMode.Singleton);
            Console.ReadLine();

        }    
    }
}